package com.Logistics.fegin;

import com.Logistics.entity.Core_org;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "pd-auth",path = "/core_org")
public interface Core_orgFeignClie {
    /**
     * 查所有组织
     * @return
     */
    @PostMapping("/queryCoreall")
    public List<Core_org> queryCoreall();

    /**
     * 根据id查组织
     * @return
     */
    @PostMapping("/queryCoreById")
    public Core_org queryCoreById(@RequestParam("id") String id);

    /**
     * 根据员工查所有下级机构包括所在机构
     * @param userid
     * @return
     */

    @GetMapping("/QueryCoreallShuZhi/{userid}")
    @ResponseBody
    public List<Core_org> QueryCoreallShuZhi(@PathVariable("userid") String userid);

    @GetMapping("/Query/{id}")
    @ResponseBody
    public List<Core_org> Query(@PathVariable("id") String id);


    /**
     * 根据省市区查机构
     * @param
     * @return
     */
    @PostMapping("/queryByProvinceCityCounty")
    @ResponseBody
    public List<Core_org> queryByProvinceCityCounty(Core_org coreOrg);
}
